Service Bus (1 / 27): You are managing a Service Bus namespace in Azure and need to retrieve the primary connection string for the "RootManageSharedAccessKey" authorization rule within the namespace named "mynamespace" and the resource group named "myresourcegroup". Write the Azure CLI command to achieve this.
Answer:
az servicebus namespace authorization-rule keys list --name RootManageSharedAccessKey --namespace-name mynamespace --resource-group myresourcegroup --query primaryConnectionString
This command lists the keys for the specified authorization rule within the Service Bus namespace. By specifying the name of the authorization rule, namespace, and resource group, and using the --query parameter to filter the output, you can retrieve the primary connection string for the specified rule.